<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>干部出国</title>
    <meta name="keywords" content="干部出国" />
    <meta name="description" content="干部出国" />
    <link href="/static/css/party/style.css" rel="stylesheet" type="text/css">
    <link href="/static/js/party/myfocus/js/mf-pattern/mF_classicHC.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/static/webjars/layui/css/layui.css"  media="all">
    <script type="application/javascript" src="/static/webjars/layui/layui.all.js"></script>
    <script type="application/javascript" src="/static/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/static/css/party/foot.css"/>


    <link href="/static/css/party/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common2018.css.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/iconfont.css" rel="stylesheet" type="text/css">

    <link href="/static/css/party/font-awesome.min.css" rel="stylesheet" type="text/css">
    <script type="application/javascript" src="/static/js/party/template-web.js"></script>
    <script type="application/javascript" src="/static/js/party/template-web-extends.js"></script>
    <script type="application/javascript" src="/static/js/party/boorstap.min.js"></script>
    <script type="application/javascript" src="/static/js/party/common.js"></script>
    <style>
        body{
            background-color: #DEEAEA;
        }
        #dingbu li a{
             display: inline;
         }

        #dingbu li a:hover{
            background-color: transparent;
        }

    </style>
    <script type="application/javascript">
        var form = layui.form;



        $.post("/ajax/party/levels",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有级别
                var names = new Array();
                for(var i=0;i<res.data.length;i++){
                    names[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names.length;i++){
                    document.getElementById("level").options.add(new Option(names[i],names[i]));
                }

            }
            else{
                layer.alert("未知错误！");
            }
            form.render();
        })

        $.post("/ajax/party/identity",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有的政治级别
                var names1 = new Array();
                for(var i=0;i<res.data.length;i++){
                    names1[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names1.length;i++){
                    document.getElementById("zhengzhi").options.add(new Option(names1[i],names1[i]));
                }
            }
            else{
                layer.alert("未知错误！");
            }
                form.render();
        })

        $.post("/ajax/party/family",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有家庭成员关系
                var names1 = new Array();
                for(var i=0;i<res.data.length;i++){
                    names1[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names1.length;i++){
                    document.getElementById("inRelative1").options.add(new Option(names1[i],names1[i]));
                    document.getElementById("outRelative1").options.add(new Option(names1[i],names1[i]));
                }
            }
            else{
                layer.alert("未知错误！");
            }
            form.render();
        })

        $.post("/ajax/party/countries",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有国家
                var names1 = new Array();
                for(var i=0;i<res.data.length;i++){
                    names1[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names1.length;i++){
                    document.getElementById("foreignCountry").options.add(new Option(names1[i],names1[i]));
                }
            }
            else{
                layer.alert("未知错误！");
            }
            form.render();
        })

    </script>

</head>
<body>
<div class="padlogo w1200 mt50">
    <div class="danghui fl ml25"><img src="/static/images/party/img/danghui.gif"/></div>
    <div class="logo fl ml20 mt8"><img src="/static/images/party/img/logo.png"/></div>
    <div class="slogo fr"><embed src="/static/images/party/img/donghua.swf" width="600" height="150" wmode="transparent" /></div>
    <div class="clear"></div>
</div>

<div class="w1000 mt60" >
    <ul class="nav" style="text-align: center" id="dingbu">
        <li class="bg2">&nbsp;</li>
        <li class="bg2" style="width: 143px;" party-src="/party/home/index"><a href="javascript:;">首页</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/news"><a href="javascript:;">新闻资讯</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/education"><a href="javascript:;">教育培训</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/service"><a href="javascript:;">服务大厅</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/map"><a href="javascript:;">党建地图</a></li>
        <li class="bg2" style="width: 143px"><a href="/party/home/admin" target="_blank">后台管理</a></li>

        <%--<li class="bg2"><a href='/views/party/fore/index1.jsp' target='_blank'>后台管理</a></li>--%>
    </ul>

</div>
<div class='nav_bg w1000 mt30'><img src='/static/images/party/img/nav_bg.png' class='tcenter'/></div>

<div class="clearfix"></div>

<div class="container" style="850px;">
    <style type="text/css">
        ul.nav-tabs {
            width: 98%;
            margin-top: 20px;
            border-radius: 4px;
            border: 1px solid #ddd;
            text-align: center;
        }

        ul.nav-tabs li {
            margin: 0;
            border-top: 1px solid #ddd;
        }

        ul.nav-tabs li:first-child {
            border-top: none;
        }

        ul.nav-tabs li a {
            margin: 0;
            padding: 8px 16px;
            color: #E62B23;
            border-radius: 0;
            line-height: 35px;
        }

        ul.nav-tabs li.active a, ul.nav-tabs li.active a:hover {
            color: #fff;
            background: #E62B23;
            border: 1px solid #E62B23;
        }

        ul.nav-tabs li:first-child a {
            border-radius: 4px 4px 0 0;
        }

        ul.nav-tabs li:last-child a {
            border-radius: 0 0 4px 4px;
        }
    </style>
    <div class="row" style="margin-top:10px">
        <div class="col-sm-6"><h4 class="service-red-border" style="color: #CC0000"><img src="/static/images/party/img/gb-icon01.png">干部因私出国（境）申请 <small style="color: #CC0000"> 请认真填写必填项</small></h4></div>
        <div class="col-sm-6 text-right"><a type="button" class="btn btn-warning" href="/party/home/abroad_search">查询出国档案</a></div>
    </div>
    <form id="form1" class="layui-form">
        <div class="row" style="background-color: #F5F5F5; padding: -10px 10px 10px 10px;">
            <div class="col-sm-12" style="background-color: #DEEAEA; ">
                <div class="form-group col-md-8 col-md-offset-2">
                    <br><br><br>
                    <h4 class="text-center">领导干部因私出国（境）申请表</h4><br><br>
                    <ul class="nav  nav-tabs nav-pills nav-justified  " id="myTab">
                        <li class="active">
                            <a href="#tab1" data-toggle="tab" id="menu1" style="font-size: 18px;font-weight: bold;">一、基本信息填写</a>
                        </li>
                        <li>
                            <a href="#tab2" data-toggle="tab" id="menu2" style="font-size: 18px;font-weight: bold;">二、出国信息填写</a>
                        </li>
                        <li style="display:none">
                            <a href="#tab3" data-toggle="tab" id="menu3" style="font-size: 18px;font-weight: bold;">三、提交、打印</a>
                        </li>
                    </ul>
                    <hr><br><br>
                    <div id="myTabContent" class="tab-content">
                        <!--startprint-->
                        <div class="tab-pane fade in active" id="tab1">
                            <div id="print1">
                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>姓名：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <input type="text" class="form-control form-control-bg" name="abdName" maxlength="20" placeholder=" 必填项">
                                </div>
                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>性别：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <label class="radio-inline">
                                        <input type="radio" name="abdSex" value="男" checked> 男
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="abdSex" value="女"> 女
                                    </label>
                                </div>
                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>健康状态：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <select class="form-control abdHealth" name="abdHealth">
                                        <option value="健康">健康</option>
                                        <option value="不健康">不健康</option>
                                        <option value="不详">不详</option>
                                    </select>
                                </div>
                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>所在单位：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <div class="layui-inline" style="width: 100%;">

                                        <div class="layui-input-inline" style="width: 100%;">
                                            <select name="toGroup" id="toGroup" lay-verify="required" lay-search="" style="width: 100%;">

                                            </select>
                                        </div>
                                    </div>

                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>职务：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <input type="text" class="form-control form-control-bg abdPost" name="abdPost" maxlength="20" placeholder=" 必填项">
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>级别：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <select class="form-control abdLevel" name="abdLevel" id="level">


                                    </select>
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>政治面貌：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <select class="form-control abdIdentity" name="abdIdentity" id="zhengzhi"></select>
                                </div>
                            </div>
                            <div class="col-sm-12 text-right" style=";background-color: #DEEAEA;padding: 30px;">
                                <button type="button" class="btn btn-warning btn-default btn-lg" style="margin-right: 20px;" onclick='javascript:$("#menu2").click()'> 下一步 </button>
                            </div>
                        </div>

                        <div id="tab2" class="tab-pane fade">
                            <div id="print2">
                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>出国目的地：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <select class="form-control abdDestination" id="foreignCountry" name="abdDestination"></select>
                                        </div>
                                        <div class="col-sm-6">
                                            <input type="text" class="form-control form-control-bg" name="abdCity" maxlength="20" placeholder="请输入城市">
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>出国时间：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <div class="row">
                                        <div class="col-sm-6">

                                            <input type="datetime" class="form-control form-control-bg" name="abdBeginDate" readonly="readonly" placeholder="请选择开始时间" id="abdBeginDate">
                                        </div>
                                        <div class="col-sm-6">

                                            <input type="datetime" class="form-control form-control-bg" name="abdEndDate" readonly="readonly" placeholder="请选择结束时间" id="abdEndDate">
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>国内通讯：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <input type="text" class="form-control form-control-bg" name="abdTelWithIn" maxlength="20" placeholder=" 必填项">
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>国外通讯：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <input type="text" class="form-control form-control-bg" name="abdTelWithOut" maxlength="20" placeholder=" 必填项">
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>经费渠道：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <input type="text" class="form-control form-control-bg" name="abdFunds" maxlength="20" placeholder=" 必填项">
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>国内亲属：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">


                                    <div class="panel panel-default" id="RelativeIn">
                                        <div class="panel-heading" style="height: 35px;">
                                            <small class="pull-right"><a onclick="addRelativeIn()">+ 新增</a></small>
                                        </div>
                                        <div class="panel-body RelativeIn">

                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>姓名：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <input type="text" class="form-control form-control-bg " name="inName1" id="inName1" maxlength="20" placeholder=" 必填项">
                                            </div>
                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>关系：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <select class="form-control inRelative" name="inShip1" id="inRelative1"></select>
                                            </div>
                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>工作单位及职位：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <input type="text" class="form-control form-control-bg inWorkInfo" name="inJob1" id="inWorkInfo1" maxlength="50" placeholder=" 必填项">
                                            </div>
                                            <a onclick="removeRelative(this)" class="btn btn-danger btn-default btn-xs pull-right">移除</a>
                                        </div>

                                    </div>
                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>国外亲属：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">




                                    <div class="panel panel-default" id="RelativeOut">
                                        <div class="panel-heading" style="height: 35px;">
                                            <small class="pull-right"><a onclick="addRelativeOut()">+ 新增</a></small>
                                        </div>
                                        <div class="panel-body RelativeOut">
                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>姓名：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <input type="text" class="form-control form-control-bg" name="outName1" id="outName1" maxlength="20" placeholder=" 必填项">
                                            </div>
                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>关系：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <select class="form-control outRelative" name="outShip1" id="outRelative1"></select>
                                            </div>
                                            <div class="col-sm-4 text-right" style="line-height: 35px;"><label>工作单位及职位：</label> </div>
                                            <div class="col-sm-8 " style="margin-bottom: 20px;">
                                                <input type="text" class="form-control form-control-bg inWorkInfo" name="outJob1" id="outWorkInfo1" maxlength="50" placeholder=" 必填项">
                                            </div>
                                            <a onclick="removeRelative(this)" class="btn btn-danger btn-default btn-xs pull-right">移除</a>
                                        </div>
                                    </div>

                                </div>



                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>出行方式：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <label class="radio-inline">
                                        <input type="radio" name="abdTripMode" value="跟团出行" checked> 跟团出行
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="abdTripMode" value="自由行"> 自由行
                                    </label>

                                </div>

                                <div class="col-sm-3 text-right" style="line-height: 35px;"><label>备注说明：</label> </div>
                                <div class="col-sm-9 " style="margin-bottom: 20px;">
                                    <textarea class="form-control" rows="5" name="abdRemark" maxlength="200"></textarea>

                                </div>
                            </div>
                            <div class="col-sm-12 text-right" style="background-color: #DEEAEA;padding: 30px;">
                                <button type="button" class="btn btn-warning btn-default btn-lg" style="margin-right: 20px;" onclick='javascript:$("#menu1").click()'> 上一步 </button>

                                <button type="button" class="btn btn-success btn-default btn-lg" style="margin-right: 20px;" id="ok"> 提交 </button>
                            </div>
                        </div>

                        <!--endprint-->
                        <div id="tab3" class="tab-pane fade">
                            <div class="col-sm-9 col-md-offset-2" style="margin-bottom: 20px; text-align: center">
                                <h3 class="gb-form-font1"><br><br>提交成功</h3><br>
                                <h5>您本次《领导干部因私出国（境）申请表》的档案码为：</h5>  <br>
                                <div class="alert alert-warning text-center" id="code"></div>
                                <h5 class="text-center"><a class="btn btn-danger" href="javascript:AboadApplyPrint()" rel="external nofollow" target="_self">打印本次《领导干部因私出国（境）申请表》</a></h5>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


<div id="ft" class="clearfix">
    <div class="ft-center">
        <span>智慧兴文公共信息平台:&nbsp;</span>
        <a>All Rights Reserved.&nbsp;&nbsp;</a>
        <span>版权所有:&nbsp;</span>
        <a href="http://www.ituohui.com/" target="_blank">四川省数聚汇智科技有限公司</a>
    </div>
</div>



</body>
</html>
<script type="application/javascript" src="/static/js/party/layer.js"></script>
<script type="application/javascript">
    $("li[party-src]").click(function(){
        var that = $(this);
        var src = that.attr("party-src");
        window.location.href = src;
    });
</script>

<script>

    function removeRelative(a) {
        $(a).parent().remove();
    }
    function addRelativeIn() {
        var html = '';
        html += ' <hr>';
        html += ' <div class="panel-body RelativeIn">';
        html += '<div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">姓名：</label> </div>';
        html += ' <div class="col-sm-8 " style="margin-bottom: 20px;">';
        html += '    <input type="text" class="form-control form-control-bg " name="inName1" id="inName' + ($(".RelativeIn").length + 1) + '" placeholder=" 必填项">';
        html += '</div>';
        html += '<div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">关系：</label> </div>';
        html += '<div class="col-sm-8 " style="margin-bottom: 20px;">';


        html += '     <select class="form-control " name="inShip1" id="inRelative' + ($(".RelativeIn").length + 1) + '">' + $(".inRelative")[0].innerHTML + '</select>';
        html += ' </div>';
        html += ' <div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">工作单位及职位：</label> </div>';
        html += ' <div class="col-sm-8 " style="margin-bottom: 20px;">';
        html += '    <input type="text" class="form-control form-control-bg " name="inJob1"  id="inWorkInfo' + ($(".RelativeIn").length + 1) + '" placeholder=" 必填项">';
        html += ' </div>';
        html += ' <a onclick="removeRelative(this)" class="btn btn-danger btn-default btn-xs pull-right">移除</a>';
        html += ' </div>';
        $("#RelativeIn").append(html);

        $.post("/ajax/party/family",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有的政治级别
                var names1 = new Array();
                for(var i=0;i<res.data.length;i++){
                    names1[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names1.length;i++){
                    document.getElementById("inRelative1").options.add(new Option(names1[i],names1[i]));
                }
            }
            else{
                layer.alert("未知错误！");
            }
            form.render();
        })
    }
    function addRelativeOut() {
        var html = '';

        html += ' <hr>';
        html += ' <div class="panel-body RelativeOut">';
        html += '<div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">姓名：</label> </div>';
        html += ' <div class="col-sm-8 " style="margin-bottom: 20px;">';
        html += '    <input type="text" class="form-control form-control-bg" name="outName1" id="outName' + ($(".RelativeOut").length + 1) + '" placeholder=" 必填项">';
        html += '</div>';
        html += '<div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">关系：</label> </div>';
        html += '<div class="col-sm-8 " style="margin-bottom: 20px;">';
        html += '     <select class="form-control" name="outShip1"  id="outRelative' + ($(".RelativeOut").length + 1) + '" >' + $(".inRelative")[0].innerHTML + '</select>';
        html += ' </div>';
        html += ' <div class="col-sm-4 text-right" style="line-height: 35px;"><label for="name">工作单位及职位：</label> </div>';
        html += ' <div class="col-sm-8 " style="margin-bottom: 20px;">';
        html += '    <input type="text" class="form-control form-control-bg" name="outJob1" id="outWorkInfo' + ($(".RelativeOut").length + 1) + '" placeholder=" 必填项">';
        html += ' </div>';
        html += ' <a onclick="removeRelative(this)" class="btn btn-danger btn-default btn-xs pull-right">移除</a>';
        html += ' </div>';
        $("#RelativeOut").append(html);
        $.post("/ajax/party/family",{
            check:1024
        },function (res) {
            if(res.code==0){
                //得到所有的政治级别
                var names1 = new Array();
                for(var i=0;i<res.data.length;i++){
                    names1[i]=res.data[i].name;
                }
                //将等级动态显示到界面上
                for(var i=0;i<names1.length;i++){
                    document.getElementById("outRelative1").options.add(new Option(names1[i],names1[i]));
                }
            }
            else{
                layer.alert("未知错误！");
            }
            form.render();
        })
    }

</script>

<script type="application/javascript">
    $("#ok").click(function () {
        var params = $("#form1").serializeObject();


        var abroadFormat = {};
        abroadFormat.partyFabroad = params;
        abroadFormat.inName1 = params.inName1;
        abroadFormat.inShip1 = params.inShip1;
        abroadFormat.inJob1 = params.inJob1;
        abroadFormat.outName1 = params.outName1;
        abroadFormat.outShip1 = params.outShip1;
        abroadFormat.outJob1 = params.outJob1;

        delete params.inName1;
        delete params.inShip1;
        delete params.inJob1;
        delete params.outName1;
        delete params.outShip1;
        delete params.outJob1;

        params.inName1 = JSON.stringify(abroadFormat.inName1).replace("\"","");
        params.inShip1 = JSON.stringify(abroadFormat.inShip1);
        params.inJob1 = JSON.stringify(abroadFormat.inJob1);
        params.outName1 = JSON.stringify(abroadFormat.outName1);
        params.outShip1 = JSON.stringify(abroadFormat.outShip1);
        params.outJob1 = JSON.stringify(abroadFormat.outJob1);


        console.log(params);
        $.ajax({
            url:"/ajax/party/abroad",
            data:params,
            type:"post",
            success:function (res) {
                if(res.code==0){
                    layer.alert("提交成功，请耐心等待！");
                    document.getElementById("form1").reset();
                }else{
                    layer.alert("请检查是否填写完整！");
                }
            }
        })


    })

</script>



<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#abdBeginDate' //指定元素
        });

        laydate.render({
            elem: '#abdEndDate' //指定元素
        });
    });

    var form = layui.form;
    form.render();

    $.post("/ajax/party/admin/branches",{
        check:1024
    },function (res) {
        if(res.code==0){
            //得到所有级别
            var names = new Array();
            for(var i=0;i<res.data.length;i++){
                names[i]=res.data[i].branchName;
            }
            console.log(names);
            //将等级动态显示到界面上
            for(var i=0;i<names.length;i++){
                document.getElementById("toGroup").options.add(new Option(names[i],names[i]));
            }

        }
        else{
            layer.alert("未知错误！");
        }
        form.render();
    });
</script>
